package day_05;

/**
 * @ClassName Day05Homework_5
 * @Description TODO
 * @Author hp
 * @Date 2021/6/7 15:00
 * @Version 1.0
 **/
public class Day05Homework_5 {
    public static void main(String[] args) {
        int[] nums = new int[]{95, 92, 75, 56, 98, 71, 80, 58, 91, 91};
        double sum = 0;

        int count = 0;
        for (int i = 0; i <nums.length ; i++) {
            sum+=nums[i];
        }
        double average=sum/nums.length;
        for (int i = 0; i < nums.length; i++) {
            if (nums[i]>average) {
                count++;
            }
        }
        System.out.println("高于平均分 "+average+"有" + count+"个");
    }
}
